﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CameraAcq
{
    /// <summary>
    /// 相机信息
    /// </summary>
    [Serializable]
    public struct CamInfo
    {
        private int _CamHandle;           //相机句柄
        private string _CamName;          //相机名
        private string _Manufacturer;     //制造商
        private string _SerialNO;         //序列号
        private string _UserDefineName;       //用户自定义相机名称
        private string _MaskName;         //mask
        private uint _ImageWidth;          //图像宽
        private uint _ImageHeight;         //图像高
        private uint _PixDepth;            //像素位深
        private string _Color;            // BW 黑白，RGB彩色
        private bool _bConnected;         //是否连接
        public object mExtInfo;           //退出信息
        /// <summary>
        /// 相机句柄
        /// </summary>
        public int m_CamHandle
        {
            set { _CamHandle = value; }
            get { return _CamHandle; }
        }
        public string m_CamName
        {
            set { _CamName = value; }
            get { return _CamName; }
        }

        public string m_Manufacturer
        {
            set { _Manufacturer = value; }
            get { return _Manufacturer; }
        }

        public string m_SerialNO
        {
            set { _SerialNO = value; }
            get { return _SerialNO; }
        }

        public string m_UserDefineName
        {
            set { _UserDefineName = value; }
            get { return _UserDefineName; }
        }

        public string m_MaskName
        {
            set { _MaskName = value; }
            get { return _MaskName; }
        }


        public uint m_ImageWidth
        {
            set { _ImageWidth = value; }
            get { return _ImageWidth; }
        }

        public uint m_ImageHeight
        {
            set { _ImageHeight = value; }
            get { return _ImageHeight; }
        }

        public uint m_PixDepth
        {
            set { _PixDepth = value; }
            get { return _PixDepth; }
        }

        public string m_Color
        {
            set { _Color = value; }
            get { return _Color; }
        }

        public bool m_bConnected
        {
            set { _bConnected = value; }
            get { return _bConnected; }
        }
    }

    /// <summary>
    /// 相机品牌，设备类型
    /// </summary>
    [Serializable]
    public enum DeviceType
    {
        DaHua, //大华
        HikVision,//海康
        TheImageSource,//映美精
        Basler,//巴斯勒
        MindVision,//迈德威视
    }

    /// <summary>
    /// 图像位深
    /// </summary>
    [Serializable]
    public enum PixelDepth
    {
        PIXEL_DEPTH_8,          ///8位
        PIXEL_DEPTH_12,         ///12位
        PIXEL_DEPTH_16          ///16位
    }

    /// <summary>
    /// 图像彩色信息
    /// </summary>
    [Serializable]
    public enum PixelType
    {
        PIX_GRAY8,              ///灰度图8位，定义时可以不要位深信息
        PIX_RGB8                ///彩色图8位
    }

    /// <summary>
    /// 芯片类型，面阵相机/线阵相机
    /// </summary>
    [Serializable]
    public enum SensorType
    {
        Area,    //面阵相机
        Line     //线阵相机
    }

    /// <summary>
    /// 触发模式
    /// </summary>
    [Serializable]
    public enum TriggerMode
    {
        continual=0,     //连续采集
        hardTrigger,     //硬件（外触发）触发
        softTrigger,     //软触发
        riseEdge,        //上升沿
        fallEdge         //下降沿
    }

    /// <summary>
    /// 曝光模式
    /// </summary>
    [Serializable]
    public enum ExposureMode
    {
        cameraSetupExposure = 0, //内部设置曝光时间
        outSignalExposure,    //电平信号设置曝光时间
    }
    /// <summary>
    /// 图像调整
    /// </summary>
    [Serializable]
    public enum ImageAdjust
    {
        None = 0,             //无
        VerticalMirror,       //垂直镜像
        HorizontalMirror,     //水平镜像
        Clockwise90,          //顺时针转90度
        Anticlockwise90,      //逆时针转90度
    }
}
